export function nativePlaceMap(list) {
  const chartDom = document.querySelector('.pie')
  const myChart = echarts.init(chartDom)

  let option = {
    legend: {
      top: 'bottom'
    },
    toolbox: {
      show: true
    },
    series: [
      {
        name: 'Nightingale Chart',
        type: 'pie',
        radius: [40, 120],
        center: ['50%', '50%'],
        roseType: 'area',
        itemStyle: {
          borderRadius: 8
        },
        label: {
          formatter(list) {
            return `${list.name} ${list.value}`
          }
        },
        data: list
      }
    ]
  }

  option && myChart.setOption(option)
}
